import { requestClient } from '#/api/request';

export namespace OrderApi {
  export interface QueryParams {
    pageNum?: number;
    pageSize?: number;
    orderSn?: string;       // 添加订单编号字段
    userPhone?: string;      // 修正为string类型
    orderStatus?: number;
    serviceType?: number;
    startDate?: string;      // 明确日期字段
    endDate?: string;
  }
}

// export async function getStoreOrder(data: OrderApi.QueryParams) {
//   return requestClient.post('/user/orderManage/order/page', { params: data });
// }
export async function getStoreOrder(data: OrderApi.QueryParams) {
  // ✅ 正确：POST请求直接传data作为请求体
  return requestClient.post('/user/orderManage/order/page', data);
}

